<?php

namespace common\models\ar;

use Yii;

/**
 * This is the model class for table "history_login".
 *
 * @property int $id
 * @property int $uid 用户ID
 * @property int $type 账户类型，1代理，2交易客户
 * @property int $time 登录时间
 * @property string $sessionID sessionID
 * @property string $ip IP信息
 * @property string $ua 登录浏览器信息
 */
class HistoryLogin extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'history_login';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['userID', 'type', 'time'], 'integer'],
            [['ua'], 'required'],
            [['ua'], 'string'],
            [['sessionID'], 'string', 'max' => 64],
            [['ip'], 'string', 'max' => 16],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'userID' => '用户ID',
            'type' => '账户类型，1代理，2交易客户',
            'time' => '登录时间',
            'sessionID' => 'sessionID',
            'ip' => 'IP信息',
            'ua' => '登录浏览器信息',
        ];
    }
}
